﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCVisualizarProjeto.ascx.cs"
    Inherits="s2b.ControleDesenvolvimentoProjetos.UserControls.WUCVisualizarProjeto" %>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table>
    <tr>
        <td>
            Projeto
        </td>
        
        <td>
            <asp:Label ID="lblProjeto" runat="server"></asp:Label>
        </td>

    </tr>
    <tr>
        <td>
            Descrição
        </td>
        <td>
            <asp:Label ID="lblDescProjeto" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            Cliente
        </td>
        <td>
            <asp:Label ID="lblCliente" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            Data Inicial
        </td>
        <td>
            <asp:Label ID="lblDtInicial" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            Data Final
        </td>
        <td>
            <asp:Label ID="lblDtFinal" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            Status
        </td>
        <td>
            <asp:Label ID="lblStatus" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <asp:UpdatePanel ID="upGraficos" runat="server">
                <ContentTemplate>
                    <asp:Panel ID="pnlGraficos" runat="server">
                        <table width="100%">
                            <tr>
                                <td>
                                    <asp:Chart ID="graficoTarefas" runat="server" DataSourceID="DSPROJETO" Palette="None"
                                        PaletteCustomColors="Red" >
                                        <Series>
                                            <asp:Series Name="Series1" ChartType="Bar" XValueMember="Tarefa" YValueMembers="PORC_CONCLUSAO">
                                            </asp:Series>
                                        </Series>
                                        <ChartAreas>
                                            <asp:ChartArea Name="ChartArea1" BackColor="White" BackGradientStyle="VerticalCenter"
                                                BackHatchStyle="BackwardDiagonal">
                                                <AxisY Title="Porcentagem">
                                                </AxisY>
                                                <AxisX Title="Tarefas">
                                                </AxisX>
                                                <Area3DStyle Enable3D="True" />
                                            </asp:ChartArea>
                                        </ChartAreas>
                                    </asp:Chart>
                                    <asp:SqlDataSource ID="DSPROJETO" runat="server" ConnectionString="<%$ ConnectionStrings:CS_DB_Controle_Projeto %>"
                                        DeleteCommand="DELETE FROM PROJETO WHERE (ID_PROJETO = @ID_PROJETO)" InsertCommand="INSERT INTO PROJETO(ID_CLIENTE, DESC_PROJETO, DT_INICIO_PROJ, DT_FINAL_PREV, ID_STATUS, CARGA_HORARIA, CARG_HOR_UTILIZ) VALUES (@ID_CLIENTE, @DESC_PROJETO, @DT_INICIO_PROJ, @DT_FINAL_PREV, @ID_STATUS, @CARGA_HORARIA, @CARG_HOR_UTILIZ)"
                                        SelectCommand="SELECT NOME_TAREFA AS Tarefa, PORC_CONCLUSAO, PORC_PROJETO FROM TAREFAS
WHERE ID_PROJETO = @ID_PROJETO" UpdateCommand="UPDATE PROJETO SET
ID_CLIENTE = @ID_CLIENTE,
DESC_PROJETO = @DESC_PROJETO,
DT_INICIO_PROJ = @DT_INICIO_PROJ,
DT_FINAL_PREV = @DT_FINAL_PREV,
ID_STATUS = @DT_ID_STATUS,
CARGA_HORARIA = @CARGA_HORARIA,
CARG_HOR_UTILIZ = @CARG_HOR_UTILIZ

WHERE ID_PROJETO = @ID_PROJETO">
                                        <DeleteParameters>
                                            <asp:Parameter Name="ID_PROJETO" />
                                        </DeleteParameters>
                                        <InsertParameters>
                                            <asp:Parameter Name="ID_CLIENTE" />
                                            <asp:Parameter Name="DESC_PROJETO" />
                                            <asp:Parameter Name="DT_INICIO_PROJ" />
                                            <asp:Parameter Name="DT_FINAL_PREV" />
                                            <asp:Parameter Name="ID_STATUS" />
                                            <asp:Parameter Name="CARGA_HORARIA" />
                                            <asp:Parameter Name="CARG_HOR_UTILIZ" />
                                        </InsertParameters>
                                        <SelectParameters>
                                            <asp:QueryStringParameter DefaultValue="0" Name="ID_PROJETO" 
                                                QueryStringField="ID_PROJETO" />
                                        </SelectParameters>
                                        <UpdateParameters>
                                            <asp:Parameter Name="ID_CLIENTE" />
                                            <asp:Parameter Name="DESC_PROJETO" />
                                            <asp:Parameter Name="DT_INICIO_PROJ" />
                                            <asp:Parameter Name="DT_FINAL_PREV" />
                                            <asp:Parameter Name="DT_ID_STATUS" />
                                            <asp:Parameter Name="CARGA_HORARIA" />
                                            <asp:Parameter Name="CARG_HOR_UTILIZ" />
                                            <asp:Parameter Name="ID_PROJETO" />
                                        </UpdateParameters>
                                    </asp:SqlDataSource>
                                </td>
                                <td>                                    
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <%--         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:Panel ID="pnlTarefas" runat="server">--%>
             <%--       <asp:Table ID="tblTarefas" runat="server">
                    </asp:Table>
                    <asp:Table ID="tblFeedbacks" runat="server">
                    </asp:Table>
                    <asp:Table ID="Table1" runat="server">
                    </asp:Table>
                    <asp:Table ID="tblComentarios" runat="server">
                    </asp:Table>--%>
                    <%--       </asp:Panel>
                        </ContentTemplate>
                    </asp:UpdatePanel>--%>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
    </tr>
</table>
<br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>

</ContentTemplate>
</asp:UpdatePanel>
